<%@page import="carsa.board.BoardDto"%>
<%@page import="carsa.board.BoardService"%>
<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<%
	
	if(request.getMethod().equals("GET")){
		response.sendRedirect("board_write.jsp");
		return;
	}
	String name = request.getParameter("name");
	if(name==null || name.equals("")){
		response.sendRedirect("board_write.jsp");
		return;
	}
	String email = request.getParameter("email");
	if(email==null || email.equals("")){
		response.sendRedirect("board_write.jsp");
		return;
	}String title = request.getParameter("title");
	if(title==null || title.equals("")){
		response.sendRedirect("board_write.jsp");
		return;
	}String content = request.getParameter("content");
	if(content==null || content.equals("")){
		response.sendRedirect("board_write.jsp");
		return;
	}
	/*
	 * create table board
				(
				board_no number(10) not null primary key,
				board_name varchar2(10) not null,
				board_title varchar2(100) not null,
				board_content varchar2(4000) not null,
				board_date sysdate,
				board_group_no number(10) not null,
				board_level number(10) not null,
				board_step number(10) not null,
				board_ref number(10) not null,
				board_filename varchar2(20)
				);
	 */
	BoardDto board=new BoardDto(0,name,title,content,null,0,0,0,0,null);
	BoardService.instance().create(board);
	response.sendRedirect("borad_list.jsp");
%>